from selenium import webdriver
import unittest


class 新的版本测试(unittest.TestCase):
    def setUp(self) -> None:
        self.wd =  webdriver.Chrome()
        return super().setUp()
    
    def tearDown(self) -> None:
        self.wd.quit()
        return super().tearDown()
    
    def test_这是一个测试用例(self):
        self.wd.get("http://localhost:8000")
        self.assertIn('successfully',self.wd.title,"未检测到successfully标题")
        # assert 'succesfully' in self.wd.title,"未检测到关键字"
        # self.fail("异常?")
    
    


if __name__ == '__main__':
    unittest.main()


